Skip to content

[WIP] Add Kimi Agentic with LMCache NIXL#2171

Closed
YukioZzz wants to merge 8 commits into
mainfrom
yichaozhu/kimi-dep-lmcache-p2p
Closed

[WIP] Add Kimi Agentic with LMCache NIXL#2171
YukioZzz wants to merge 8 commits into
mainfrom
yichaozhu/kimi-dep-lmcache-p2p

Conversation

@YukioZzz

Copy link
Copy Markdown
Collaborator

Adds a MI355X Kimi-K2.7-Code-MXFP4 DEP vLLM disagg CI point using MultiConnector[NixlConnector + LMCacheMPConnector] with LMCache 1.2T and P2P disabled for the 1P1D bring-up path.\n\nAlso includes the LMCacheMP new-request block tracking fix and static vLLM router endpoints for lmcache-nixl.

Comment thread configs/amd-master.yaml
Comment thread .github/workflows/benchmark-multinode-tmpl.yml Outdated
Comment thread perf-changelog.yaml Outdated
Comment thread benchmarks/single_node/agentic/kimik2.7_fp4_mi355x.sh Outdated
@YukioZzz YukioZzz marked this pull request as draft July 12, 2026 16:49
@YukioZzz YukioZzz changed the title Add Kimi DEP LMCache NIXL p2p-off CI [WIP] Add Kimi Agentic with LMCache NIXL Jul 12, 2026
@YukioZzz YukioZzz force-pushed the yichaozhu/kimi-dep-lmcache-p2p branch from 8078ef7 to a359f72 Compare July 12, 2026 16:52
@YukioZzz YukioZzz force-pushed the yichaozhu/kimi-dep-lmcache-p2p branch from 7636bfa to 1545b53 Compare July 13, 2026 03:17
@cquil11 cquil11 added the agentx AgentX benchmarks, recipes, and infrastructure label Jul 13, 2026
cquil11 added 2 commits July 14, 2026 00:48
# Conflicts:
#	benchmarks/multi_node/amd_utils/job.slurm
#	benchmarks/multi_node/amd_utils/models_vllm.yaml
#	perf-changelog.yaml
@cquil11 cquil11 marked this pull request as ready for review July 14, 2026 06:02
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for the contribution! Please reach out to respective companies' CODEOWNER to fill in the latest PR_REVIEW_CHECKLIST.md before pinging core maintainer on Slack for review. In order for the signoff PR check bot to trigger, you must follow the PR_REVIEW_CHECKLIST.md template correctly, including the phrase As a PR reviewer and CODEOWNER, I have reviewed this and have.

For PR verification, add the full-sweep-fail-fast label (strongly recommended) to this PR — the benchmark sweep only runs on labeled PRs. Use full-sweep-enabled only if you need matrix jobs to keep running past a failure.

PR authors are responsible for ensuring that after merging, all GitHub Action jobs fully pass. A lot of the time, failures are just flakes and simply re-running the failed jobs will fix it. See GitHub's docs on re-running failed jobs


感谢你的贡献!请联系相应公司的 CODEOWNER 填写最新的 PR_REVIEW_CHECKLIST.md,然后再在 Slack 上联系核心维护者进行审阅。为了触发 signoff PR 检查机器人,你必须正确遵循 PR_REVIEW_CHECKLIST.md 模板,包括保留英文语句 As a PR reviewer and CODEOWNER, I have reviewed this and have

如需进行 PR 验证,请为此 PR 添加 full-sweep-fail-fast 标签(强烈推荐)— 基准测试 sweep 仅在带有标签的 PR 上运行。仅当需要矩阵任务在失败后继续运行时才使用 full-sweep-enabled

PR 作者有责任确保合并后所有 GitHub Action 任务完全通过。 很多时候失败只是偶发抖动(flake),重新运行失败的任务即可解决。参见 GitHub 关于重新运行失败任务的文档

@claude

claude Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Claude finished @cquil11's task in 7m 49s —— View job


Re-review: Kimi K2.7 DEP LMCache NIXL

The changed-file set has shifted substantially since the prior review (the workflow-heredoc file and the single-node script are no longer part of this PR), so I re-reviewed the full current diff against origin/main.

Todo

  • Gather context (diff vs origin/main, read changed files)
  • Check whether previously-flagged issues were resolved
  • Review new/expanded files for bugs
  • Post review

Previously-flagged issues — all resolved ✅

  1. MODEL_NAME=Kimi-K2.7-Code-MXFP4-DEP had no matching model entry → now models_vllm.yaml defines a Kimi-K2.7-Code-MXFP4-DEP: entry with hf_dir: "models--amd--Kimi-K2.7-Code-MXFP4" (reuses the real weights dir), so job.slurm's grep -q "^${MODEL_NAME}:" validation passes.
  2. pr-link: .../pull/TBD → now .../pull/2171, so prepare_perf_changelog_merge.py won't hard-fail at merge.
  3. Heredoc syntax error in benchmark-multinode-tmpl.yml → that file is no longer in this PR's diff.
  4. Duplicate env block in the single-node script → that file is no longer in this PR's diff.

New review of current diff

I checked the higher-risk changes and did not find blocking bugs:

  • PREFILL/DECODE_ENABLE_DP now emits --decode-context-parallel-size instead of --enable-dp-attention (server_vllm.sh:177-185). I confirmed this only affects vllm-disagg recipes, and the only other vllm-disagg recipe (kimik2.5-fp4-mi355x-vllm-disagg) uses dp-attn: false throughout — the dp-attn: true blocks elsewhere belong to sglang-disagg recipes (different server script). No regression to existing recipes.
  • Env propagation for the vars referenced in job.slurm but not re-exported in submit.sh (DOCKER_PULL_POLICY, LMCACHE_*, MORI_*) works via sbatch --export=ALL (default), so DOCKER_PULL_POLICY=always and the LMCache knobs reach the job.
  • Agentic branch gating (server_vllm.sh:694) is satisfied because the workflow sets IS_AGENTIC=1 for scenario-type == 'agentic-coding'.
  • Static router endpoints for the lmcache-nixl path (job.slurm) assign the first xP node IPs as --prefill and the rest as --decode; host-side (${xP}, ${IPADDRS}) vs runtime (\${_router_ips[\$i]}) expansion is escaped correctly.
  • Master config + perf-changelog: amd-master.yaml changed and perf-changelog.yaml updated in the same PR, with the new entry appended to the end of the file. ✅

Minor (non-blocking)

  • The Kimi-K2.7-Code-MXFP4-DEP comment in models_vllm.yaml says --enable-dp-attention is appended by server_vllm.sh, but the code now appends --decode-context-parallel-size. Worth aligning the comment when convenient, but it doesn't affect behavior.

LGTM — no blocking issues found. Note the PR title still says [WIP]; the labels are full-sweep-enabled (consider full-sweep-fail-fast per the bot comment for fail-fast validation).
· yichaozhu/kimi-dep-lmcache-p2p

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Comment on lines 264 to +268

# =============================================================================
# KV connector selection
# =============================================================================
_MORIIO_EXTRA="\"kv_connector_extra_config\": {\"proxy_ip\": \"${NODE0_ADDR}\", \"proxy_ping_port\": \"${PROXY_PING_PORT}\", \"http_port\": \"${SERVER_PORT}\"}"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 The prefill/decode --kv-transfer-config for MoRIIOConnector previously hardcoded "read_mode": true inside kv_connector_extra_config; the new MORIIO_PREFILL_CONN/MORIIO_DECODE_CONN templates in server_vllm.sh (used as the default KVT_PREFILL/KVT_DECODE for every existing moriio recipe, not just the new DEP recipe) drop that key entirely and rely instead on job.slurm's -e VLLM_MORIIO_CONNECTOR_READ_MODE=${VLLM_MORIIO_CONNECTOR_READ_MODE:-1}. This is a pre-existing issue in the sense that it affects already-productionized recipes (kimik2.5-fp4-mi355x-vllm-disagg, minimaxm3-fp4/fp8-mi355x-vllm-disagg) rather than the new DEP recipe this PR adds, but the regression itself is introduced by this PR's refactor of the shared server_vllm.sh KV-connector logic, and perf-changelog.yaml (PR #1585) explicitly documents that the env var was deliberately abandoned in favor of the extra_config key for the v0.24.0 image those recipes still use.

Extended reasoning...

What changed and why it matters

Before this PR, server_vllm.sh built the vLLM --kv-transfer-config JSON inline for each of the three MoRIIOConnector launch sites (rank-0 prefill, additional prefill nodes, decode nodes), and that JSON hardcoded "read_mode": true inside kv_connector_extra_config. This PR refactors that into reusable templates — MORIIO_PREFILL_CONN / MORIIO_DECODE_CONN (server_vllm.sh:264-268) — which are used as KVT_PREFILL/KVT_DECODE by default for the moriio|"" case arm. Critically, that default arm is a no-op — it does not fall back to a different template that preserves read_mode. The new templates only carry proxy_ip, proxy_ping_port, and http_port; the read_mode key is gone.

To compensate, job.slurm now exports -e VLLM_MORIIO_CONNECTOR_READ_MODE=${VLLM_MORIIO_CONNECTOR_READ_MODE:-1} into the container (job.slurm:473). The intent is clearly to preserve READ-mode behavior via an environment variable instead of the JSON config key.

Why this is risky rather than just a refactor

perf-changelog.yaml (entry for PR #1585, config-key kimik2.5-fp4-mi355x-vllm-disagg) documents that this exact env var was deliberately deprecated for the vllm/vllm-openai-rocm:v0.24.0 image:

Bump image to vllm/vllm-openai-rocm:v0.24.0 (MoRI-IO fixes upstreamed in vllm#40344) ... set read_mode via kv_connector_extra_config instead of VLLM_MORIIO_CONNECTOR_READ_MODE env var.

kimik2.5-fp4-mi355x-vllm-disagg in configs/amd-master.yaml still pins vllm/vllm-openai-rocm:v0.24.0 today, and minimaxm3-fp4-mi355x-vllm-disagg / minimaxm3-fp8-mi355x-vllm-disagg route through the same shared server_vllm.sh moriio templates. None of these recipes set PREFILL_KV_CONNECTOR/DECODE_KV_CONNECTOR to anything other than the moriio default, so they all pick up MORIIO_PREFILL_CONN/MORIIO_DECODE_CONN and lose the extra_config read_mode key.

Concrete walk-through

  1. Before: kimik2.5-fp4-mi355x-vllm-disagg prefill launch included --kv-transfer-config '{"kv_connector": "MoRIIOConnector", "kv_role": "kv_producer", "kv_connector_extra_config": {..., "read_mode": true}}'.
  2. After this PR: the same recipe (unchanged additional-settings, still on v0.24.0) now gets KVT_PREFILL=$MORIIO_PREFILL_CONN, whose kv_connector_extra_config has no read_mode key at all.
  3. job.slurm sets VLLM_MORIIO_CONNECTOR_READ_MODE=1 in the container env, but per the [Fix] Remove MoRI-IO patches from vLLM Disagg benchmarks  #1585 changelog, that env var was specifically superseded because v0.24.0's connector reads read_mode from kv_connector_extra_config, not the environment.
  4. If the connector does not consult the env var on this image (which is exactly what "instead of" implies), read_mode silently reverts to the connector's internal default, which — absent an explicit true — is WRITE mode.
  5. WRITE mode is precisely the failure path that the setup_deps.sh MoRIIO patches (save_kv_layer busy-spin/deadlock fix, notify-parser fix) exist to work around; this PR carries no test or assertion that would catch the regression, and none of the three affected recipes are part of this PR's own new/tested surface (only the new lmcache-nixl DEP recipe is).

Fix

Either keep read_mode in the kv_connector_extra_config templates for the moriio case (so existing recipes are unaffected regardless of which image/connector version they run), or confirm the specific vLLM/connector version each affected recipe uses actually honors VLLM_MORIIO_CONNECTOR_READ_MODE before relying on it exclusively. Given kimik2.5-fp4-mi355x-vllm-disagg is still pinned to v0.24.0, the safer fix is the former.

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agentx AgentX benchmarks, recipes, and infrastructure full-sweep-enabled

Projects

Development

Successfully merging this pull request may close these issues.

2 participants